﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 素数因子
{
    internal class Program
    {
        static void Main(string[] args)
        {
            try
            {
                List<int> b=new List<int>();
                int a = int.Parse(Console.ReadLine());
                for (int i=2; i<=a; i+=1)
                {
                    while ((a % i) == 0) { a=a / i; b.Add(i); }
                    if (a == 1)
                    {
                        break;
                    }
                }
                Console.Write("素数因子为：");
                foreach (int j in b){
                    Console.Write(j.ToString());
                    Console.Write(" ");
                }
                Console.Write("\n");
                Console.ReadKey();
            }
            catch (Exception)
            {
                Console.WriteLine("Invalid Input!");
                Console.ReadKey();

                throw;
            }
            
        }
    }
}
